<% if product.storefront_description.present? %>
  <% description_text = strip_tags(product.storefront_description) %>
  <div data-controller="read-more" class="flex flex-col gap-4" data-read-more-more-text-value="<%= Spree.t(:read_more) %>" data-read-more-less-text-value="Read less">
    <div class="prose product-description text-sm <%= 'product-description-truncated' if description_text.size > 250 %>" data-read-more-target="content">
      <%= raw(product.storefront_description) %>
    </div>
    <% if description_text.size > 250 %>
      <%= button_tag Spree.t(:read_more), type: 'button', data: { action: "read-more#toggle" }, class: "font-bold underline text-sm" %>
    <% end %>
  </div>
<% end %>